<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>JSPFROMt</title>
		<script type="text/javascript" language="javascript">
			window.onload = function(){
				document.getElementById("form").onsubmit=function(){
					var form = document.getElementById("form");
					var iderrormsg = document.getElementById("iderrormsg");
					var msg = form.msg.value;
					if(msg==""){
						iderrormsg.textContent="message?";
						return false;
					}
					return true;
				};
			};
		</script>
	</head>
	<body>
		<jsp:include page="/jspdemo/header.jsp" />
		<form id="form" action="jspto.jsp" method="post" >
			文本：
			<input type="text" name="msg" />
			<input type="submit" value="发送">
			<label id="iderrormsg" style="color:red"></label>
		</form>
	</body>
</html>